package com.cy.pj.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/")
public class PageController {
    //rest风格的url定义
    //语法格式:/{a}/{b}/...;其中{}中的内容可以理解为一个变量
    //@PathVariable 注解用于获取url中与方法参数相同的变量值
    @RequestMapping("{moduleUI}")
    public String doModuleUI(@PathVariable String moduleUI){
        return moduleUI;
    }
    @RequestMapping("doIndexUI")
    public String doIndexUI(){
        return "index";
    }

    @RequestMapping("doMenuUI")
    public String doMenuUI(){
        return "permission";
    }

    @RequestMapping("doLoginUI")
    public String doLoginUI(){
        return "login";
    }

    /**
     * 跳转管理员登录页面
     * @return
     */
    /*@RequestMapping("MainLogin")
    public String doMainLogin(){
        return "main";
    }
    @RequestMapping("UserUI")
    public String doUserUI(){
        return "user";
    }
    @RequestMapping("RoleUI")
    public String doRoleUI(){
        return "role";
    }
    @RequestMapping("PermissionUI")
    public String doPermissionUI(){
        return "permission";
    }
*/

}
